package charpter11.lynx;

import java.util.PriorityQueue;
import java.util.Random;

public class TwentyEight {
	public static void main(String[] args) {
		Random rd = new Random();
		PriorityQueue<Double> queue = new PriorityQueue<Double>();
		for (int i = 0; i < 20; i++) {
			queue.offer(rd.nextDouble());
		}
		Double num;
		while ((num = queue.poll()) != null) {
			System.out.println(num);
		}
	}
}
